package com.servlet;

import com.entity.DinerCategory;
import com.entity.DinerComment;
import com.entity.dto.LayuiPage;
import com.service.DinerCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping
@CrossOrigin
public class DinerCategoryServlet {
    @Autowired
    DinerCategoryService dinerCategoryService;
    @RequestMapping("getDinerCategoryInfo")
    public LayuiPage<DinerCategory> getDinerCategoryInfo() {
        LayuiPage<DinerCategory> layuiPage = new LayuiPage<>();
        layuiPage.setType("Array");
        layuiPage.setMsg("ok");
        layuiPage.setData(dinerCategoryService.getDinerCategoryInfo());
        return layuiPage;
    }
}
